package com.dq;

import com.dq.utils.SpringUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@ComponentScan
@EnableScheduling
@EnableAsync
@EnableSwagger2
public class ApiApplication {

    public static void main(String[] args) {
        try {
            ApplicationContext app = SpringApplication.run(ApiApplication.class, args);
            SpringUtil.setApplicationContext(app);
            System.out.println("启动了");
        }catch (Exception e) {
            e.printStackTrace();
        }
    }

}
